package designpatterns.iterator;

import lombok.extern.slf4j.Slf4j;
import org.junit.Test;

/**
 * @author LiDong
 * @version 1.0.0
 * @createTime 2/16/2022 7:55 PM
 */
@Slf4j
public class AppTest {

    @Test
    public void test() {
        Persons persons = new Persons();
        for (Iterator iterator = persons.getIterator(); iterator.hasNext(); ) {
            Object next = iterator.next();
            log.info((String) next);
        }
    }

}
